function loadjscssfile(filename, filetype){
	if (filetype=="js"){ //if filename is a external JavaScript file
		var fileref=document.createElement('script')
		fileref.setAttribute("type","text/javascript")
		fileref.setAttribute("src", filename+'?'+Math.random())
	}
	else if (filetype=="css"){ //if filename is an external CSS file
		var fileref=document.createElement("link")
		fileref.setAttribute("rel", "stylesheet")
		fileref.setAttribute("type", "text/css")
		fileref.setAttribute("href", filename+'?'+Math.random())
	}
	if (typeof fileref!="undefined")
		document.getElementsByTagName("head")[0].appendChild(fileref)
}

//Load jQuery+UI
loadjscssfile("http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js", "js");
loadjscssfile("http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css", "css");
loadjscssfile("http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js", "js");

//Initialise
$("html > body").html();

$("html > body").append('<h1 id="ttOfferPatterns">T&amp;T Offer Patterns</h1>');
